<?php
namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Model;

class MemberFollow extends Model
{
    use HasDateTimeFormatter;

    protected $table = 'member_follow';

    protected $primaryKey = 'id';

    protected $fillable = [
        'member_id', // 会员ID
        'follow_id', // 关注会员ID
    ];

    public function member()
    {
        return $this->belongsTo(Member::class, 'member_id');
    }

    public function follow_member()
    {
        return $this->belongsTo(Member::class, 'follow_id');
    }
}
